package com.wenwei.activity;

import android.os.Bundle;
import android.widget.TextView;


import com.wenwei.bean.MessageListBean;
import com.wenwei.parking.BaseActivity;
import com.wenwei.parking.R;
import com.wenwei.utils.RogerDateUtils;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by nidalee on 2017/9/8.
 */

public class MessageDetailsActivity extends BaseActivity {
    @Bind(R.id.base_title)
    TextView baseTitle;

    MessageListBean.DataBean mBean;
    @Bind(R.id.message_title)
    TextView messageTitle;
    @Bind(R.id.message_time)
    TextView messageTime;
    @Bind(R.id.message_content)
    TextView messageContent;

    @Override
    protected void init() {
        super.init();
        mBean = (MessageListBean.DataBean) getIntent().getSerializableExtra("bean");
    }

    @Override
    public int setLayoutResourceId() {
        return R.layout.activity_message_details;
    }



    @Override
    protected void initView() {
        super.initView();
        baseTitle.setText("消息详情");
        messageTitle.setText(mBean.getTitle());
        messageTime.setText(RogerDateUtils.getDateToString(mBean.getTimes()));
        messageContent.setText(mBean.getContent());
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    @OnClick(R.id.base_back)
    public void onViewClicked() {
        finish();
    }

}
